<?php

/**
 * Profesor form.
 *
 * @package    dnevnik
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfPropelFormTemplate.php 10377 2008-07-21 07:10:32Z dwhittle $
 */
class ProfesorForm extends BaseProfesorForm
{
  public function configure()
  {
    $this->setWidget('tip', new sfWidgetFormChoice(array('choices' => ProfesorPeer::getTips())));
    $profil = $this->getObject()->getProfil();
    if(is_null($profil))
    {
      $profil = new Profil();
      $this->getObject()->setProfil($profil);
    }

    $profil_form = new ProfilForm($profil);
    $profil_form->setDefault('tip', ProfilPeer::$tip['profesor']);

    $this->embedForm('profil', $profil_form);
  }
}